Optimal. Leaf size=37 \[ -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {a-a \cos (x)}}\right )}{\sqrt {a}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2728, 212}
\begin {gather*} -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {a-a \cos (x)}}\right )}{\sqrt {a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {a-a \cos (x)}} \, dx &=-\left (2 \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \sin (x)}{\sqrt {a-a \cos (x)}}\right )\right )\\ &=-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {a-a \cos (x)}}\right )}{\sqrt {a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 36, normalized size = 0.97 \begin {gather*} \frac {2 \left (-\log \left (\cos \left (\frac {x}{4}\right )\right )+\log \left (\sin \left (\frac {x}{4}\right )\right )\right ) \sin \left (\frac {x}{2}\right )}{\sqrt {a-a \cos (x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 25, normalized size = 0.68
method | result | size |
default | \(-\frac {\sin \left (\frac {x}{2}\right ) \arctanh \left (\cos \left (\frac {x}{2}\right )\right ) \sqrt {2}}{\sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}}\) | \(25\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 81 vs.
\(2 (28) = 56\).
time = 0.56, size = 81, normalized size = 2.19 \begin {gather*} -\frac {\sqrt {2} \log \left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (x\right ), \cos \left (x\right )\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (x\right ), \cos \left (x\right )\right )\right )^{2} + 2 \, \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (x\right ), \cos \left (x\right )\right )\right ) + 1\right ) - \sqrt {2} \log \left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (x\right ), \cos \left (x\right )\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (x\right ), \cos \left (x\right )\right )\right )^{2} - 2 \, \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (x\right ), \cos \left (x\right )\right )\right ) + 1\right )}{2 \, \sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 87, normalized size = 2.35 \begin {gather*} \left [\frac {\sqrt {2} \log \left (-\frac {{\left (\cos \left (x\right ) + 3\right )} \sin \left (x\right ) - \frac {2 \, \sqrt {2} \sqrt {-a \cos \left (x\right ) + a} {\left (\cos \left (x\right ) + 1\right )}}{\sqrt {a}}}{{\left (\cos \left (x\right ) - 1\right )} \sin \left (x\right )}\right )}{2 \, \sqrt {a}}, \sqrt {2} \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {-a \cos \left (x\right ) + a} \sqrt {-\frac {1}{a}}}{\sin \left (x\right )}\right )\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {- a \cos {\left (x \right )} + a}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 20, normalized size = 0.54 \begin {gather*} \frac {\sqrt {2} \log \left ({\left | \tan \left (\frac {1}{4} \, x\right ) \right |}\right )}{\sqrt {a} \mathrm {sgn}\left (\sin \left (\frac {1}{2} \, x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {1}{\sqrt {a-a\,\cos \left (x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________